package com.holic.spring.custom.fetcher;

import com.holic.spring.custom.model.User;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;

/**
 * @ClassName GetUserFetcher
 * @Description
 * @Author Neil
 * @Date 2024/11/13 17:23
 * @Version V1.0
 **/
public class GetUserFetcher implements DataFetcher<User> {
    @Override
    public User get(DataFetchingEnvironment environment) throws Exception {
        User user = new User();
        user.setId("123");
        user.setAge(30);
        user.setName("holic");
        return user;
    }
}
